/*******************************************************************************
 *
 * File: Gamma/STRefVDPFilters.h
 * Copyright (c) 2005-2007,2008 by STMicroelectronics. All rights reserved.
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file COPYING in the main directory of this archive for
 * more details.
 *
 * Description : Contains filter coeffs for Horizontal & vertical format
 *               (HAL video display displaypipe family) taken from the
 *               ST Reference drivers.
 *
 ******************************************************************************/

#ifndef _STREF_VDP_FILTER_H
#define _STREF_VDP_FILTER_H

typedef ULONG U32;
typedef char  S8;

#define HFC_NB_COEFS 35
#define VFC_NB_COEFS 22


/***********************************************************/
/*                                                         */
/*                 HORIZONTAL COEFFICIENTS                 */
/*         ----------------------------------------        */
/*         1      < Zoom < 10     -> use coeffs 'A'        */
/*                  Zoom = 1      -> use coeffs 'B'        */
/*         0.80   < Zoom < 1      -> use coeffs 'C'        */
/*         0.60   < Zoom < 0.80   -> use coeffs 'D'        */
/*         0.50   < Zoom < 0.60   -> use coeffs 'E'        */
/*         0.25   < Zoom < 0.50   -> use coeffs 'F'        */
/*                                                         */
/***********************************************************/

/* Filter coeffs available for Horizontal zoom >1 (zoom in) */
/*----------------------------------------------------------*/
/* Filter coefficients to minimize ringing effect.
   Best trade off between ringing and picture quality (blur) */
static const S8 HorizontalCoefficientsA[HFC_NB_COEFS*4] =
{
    -2,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
    -1,     -1,     -1,     -1,
     8,      8,      8,      7,
     6,      5,      4,      3,
     2,      1,      0,     -2,
    -3,     -5,     -6,     -7,
    -8,     -9,    -10,    -10,
   -11,    -11,    -11,    -11,
   -10,     -8,     -7,     -6,
    -4,     -2,      1,      4,
  -127,   -123,   -119,   -112,
  -105,    -97,    -89,    -80,
   -70,    -60,    -50,    -39,
   -28,    -17,     -6,      5,
    16,     27,     38,     48,
    58,     68,     77,     86,
    94,    101,    108,   114 ,
   119,    123,    126,   127 ,
   127,      9,     -1,    -1 ,
     1,      0,      1,     0 ,
    -8,      3,   -128,     0
};


/* Filter coeffs  for Horizontal zoom chroma = 2 (zoom-in) */
/*---------------------------------------------------------*/
/* Original filters */
static const U32 HorizontalCoefficientsChromaZoomX2[HFC_NB_COEFS] =
{
    0x02020202,
    0x00000101,
    0xFFFFFF00,
    0xFDFEFEFE,
    0xFDFDFDFD,
    0xFDFDFDFD,
    0xFFFFFEFE,
    0x01010000,
    0xFAF8F7F6,
    0xFFFEFCFB,
    0x04030200,
    0x08070605,
    0x09090908,
    0x07080909,
    0x02030506,
    0xFAFCFE00,
    0x0E111518,
    0x0104070B,
    0xF4F7FAFD,
    0xEBEDEFF2,
    0xE7E8E8EA,
    0xEBEAE9E7,
    0xF9F4F1ED,
    0x0F0802FD,
    0xCBC7C3BF,
    0xDFDAD5D0,
    0xF5EFEAE4,
    0x0A0500FA,
    0x1F1A1610,
    0x302C2724,
    0x3B393634,
    0x40403F3D,
    0x03F71640,
    0x000A03FD,
    0x048103E9
};


/* Filter coeffs available for Horizontal zoom 1 (no zoom) */
/*---------------------------------------------------------*/
static const U32 HorizontalCoefficientsB[HFC_NB_COEFS] =
{
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0xFF) << 24) | ((U32)(0 & 0xFF) << 16) | ((U32)(0 & 0xFF) << 8) | (0 & 0xFF),
    ((U32)(0 & 0x1) << 26) | ((U32)(128 & 0x3FF) << 16) | ((U32)(0 & 0x1) << 10) | (0 & 0x3FF)
};

/* Filter coeffs available from Horizontal zoom 0.80 to zoom 0.99 (zoom out) */
/*---------------------------------------------------------------------------*/
static const S8 HorizontalCoefficientsLumaC[HFC_NB_COEFS*4] =
{
      -3,    -2,    -1,     0 ,
      -1,     1,     1,     1 ,
       3,     2,     3,     4 ,
       4,     4,     4,     4 ,
       4,     5,     5,     5 ,
       5,     4,     4,     4 ,
       4,     3,     3,     2 ,
       2,     1,     1,     0 ,
      17,    16,    15,    14 ,
      13,    12,    10,     9 ,
       8,     7,     5,     4 ,
       2,     1,    -1,    -2 ,
      -4,    -5,    -7,    -8 ,
      -9,   -11,   -12,   -13 ,
     -15,   -16,   -17,   -17 ,
     -18,   -19,   -19,   -20 ,
     -44,   -44,   -44,   -44 ,
     -43,   -43,   -42,   -41 ,
     -40,   -38,   -37,   -35 ,
     -33,   -30,   -28,   -25 ,
     -22,   -19,   -16,   -12 ,
      -8,    -5,     0,     4 ,
       8,    13,    18,    23 ,
      28,    33,    38,    43 ,
     -34,   -24,   -20,   -14 ,
      -9,    -4,     2,     8 ,
      12,    17,    22,    28 ,
      32,    36,    42,    46 ,
      51,    54,    59,    62 ,
      65,    69,    73,    75 ,
      78,    81,    83,    84 ,
      86,    87,    88,    89 ,
     100,    43,   -20,    -1 ,
       7,     0,   -11,     3 ,
      13,     0,    90,     0
};

static const S8 HorizontalCoefficientsChromaC[HFC_NB_COEFS*4] =
{
      -8,    -6,    -6,    -4 ,
      -2,    -1,    -2,    -1 ,
       0,     2,     2,     3 ,
       3,     3,     3,     3 ,
       3,     3,     4,     4 ,
       4,     4,     5,     5 ,
       5,     5,     6,     6 ,
       6,     6,     6,     6 ,
       2,     2,     2,     2 ,
       2,     2,     2,     2 ,
       2,     2,     2,     2 ,
       1,     1,     1,     1 ,
       0,     0,     0,    -1 ,
      -1,    -2,    -2,    -2 ,
      -3,    -3,    -3,    -4 ,
      -4,    -4,    -4,    -4 ,
     -31,   -31,   -31,   -31 ,
     -31,   -30,   -29,   -29 ,
     -28,   -27,   -26,   -25 ,
     -23,   -22,   -20,   -18 ,
     -16,   -14,   -12,   -10 ,
      -7,    -4,    -1,     2 ,
       5,     8,    11,    15 ,
      19,    22,    26,    30 ,
     -20,   -13,    -8,    -5 ,
      -2,     1,     6,    10 ,
      13,    16,    20,    24 ,
      28,    32,    35,    39 ,
      43,    46,    49,    53 ,
      55,    58,    60,    62 ,
      66,    68,    69,    71 ,
      72,    74,    75,    76 ,
      83,    32,    -4,     6 ,
      -5,     3,    -1,     3 ,
      26,     0,    78,     0
};


/* Filter coeffs available from Horizontal zoom 0.60 to zoom 0.80 (zoom out) */
/*----------------------------------------------------------------------------*/
static const S8 HorizontalCoefficientsLumaD[HFC_NB_COEFS*4] =
{
       7,     7,     8,     7 ,
       6,     6,     5,     5 ,
       6,     5,     4,     3 ,
       3,     3,     3,     2 ,
       1,     1,     0,     0 ,
      -1,    -2,    -2,    -3 ,
      -3,    -4,    -5,    -6 ,
      -6,    -7,    -8,    -9 ,
       3,     2,     1,     0 ,
       0,    -1,    -2,    -3 ,
      -4,    -5,    -6,    -7 ,
      -7,    -8,    -9,   -10 ,
     -10,   -11,   -11,   -12 ,
     -12,   -12,   -13,   -13 ,
     -13,   -13,   -13,   -12 ,
     -12,   -12,   -11,   -10 ,
     -45,   -44,   -43,   -42 ,
     -41,   -39,   -38,   -36 ,
     -34,   -32,   -30,   -27 ,
     -25,   -22,   -19,   -17 ,
     -14,   -11,    -7,    -4 ,
      -1,     3,     7,    10 ,
      14,    18,    22,    26 ,
      30,    34,    38,    43 ,
      -9,    -1,     3,     8 ,
      12,    16,    21,    25 ,
      28,    32,    36,    40 ,
      43,    46,    49,    53 ,
      56,    59,    60,    63 ,
      66,    68,    70,    72 ,
      72,    74,    76,    76 ,
      77,    78,    78,    78 ,
      84,    45,    -9,   -10 ,
       2,     0,   -11,     3 ,
      25,     0,    79,     0
};

static const S8 HorizontalCoefficientsChromaD[HFC_NB_COEFS*4] =
{
          -3,    -2,    -2,    -1 ,
          -1,    -1,    -1,     1 ,
           1,     0,     1,     0 ,
           2,     2,     2,     2 ,
           1,     1,     1,     0 ,
           0,     0,     0,     0 ,
          -1,    -1,    -1,    -2 ,
          -2,    -2,    -3,    -3 ,
           0,     0,     0,    -1 ,
          -1,    -2,    -2,    -2 ,
          -3,    -3,    -4,    -4 ,
          -4,    -4,    -5,    -5 ,
          -5,    -5,    -5,    -5 ,
          -5,    -5,    -5,    -5 ,
          -4,    -4,    -4,    -3 ,
          -2,    -2,    -1,     0 ,
         -34,   -33,   -32,   -31 ,
         -30,   -28,   -27,   -25 ,
         -24,   -22,   -20,   -18 ,
         -16,   -14,   -12,   -10 ,
          -8,    -5,    -3,    -1 ,
           2,     5,     7,    10 ,
          13,    16,    18,    21 ,
          24,    27,    30,    33 ,
           0,     7,    10,    12 ,
          15,    18,    21,    22 ,
          25,    28,    31,    33 ,
          34,    37,    39,    41 ,
          44,    45,    47,    49 ,
          51,    53,    54,    56 ,
          57,    57,    60,    61 ,
          61,    62,    62,    62 ,
          74,    30,     1,    -4 ,
           2,     0,    -2,     3 ,
          33,     0,    63,     0
};


/* Filter coeffs available from Horizontal zoom 0.50 to zoom 0.60 (zoom out) */
/*------------------------------------------------------------------------------*/
static const S8 HorizontalCoefficientsLumaE[HFC_NB_COEFS*4] =
{
           7,     6,     6,     6 ,
           4,     5,     3,     3 ,
           2,     1,     0,     1 ,
          -1,    -1,    -1,    -3 ,
          -3,    -4,    -4,    -5 ,
          -5,    -6,    -6,    -7 ,
          -7,    -7,    -8,    -8 ,
          -8,    -9,    -9,    -9 ,
         -10,   -10,   -10,   -10 ,
         -10,   -10,   -10,   -10 ,
         -10,   -10,   -10,   -10 ,
          -9,    -9,    -9,    -8 ,
          -8,    -7,    -6,    -6 ,
          -5,    -4,    -3,    -2 ,
          -1,     0,     1,     2 ,
           3,     5,     6,     7 ,
         -34,   -32,   -31,   -29 ,
         -27,   -25,   -23,   -21 ,
         -19,   -17,   -15,   -13 ,
         -11,    -8,    -6,    -4 ,
          -1,     1,     4,     6 ,
           9,    11,    14,    16 ,
          19,    21,    24,    26 ,
          29,    32,    34,    37 ,
          11,    18,    21,    23 ,
          26,    28,    31,    33 ,
          35,    38,    40,    42 ,
          44,    46,    47,    50 ,
          51,    53,    53,    55 ,
          56,    57,    58,    59 ,
          59,    59,    60,    60 ,
          61,    60,    61,    61 ,
          69,    35,     9,    -9 ,
          -6,     3,    -5,     3 ,
          38,     0,    62,     0
};

static const S8 HorizontalCoefficientsChromaE[HFC_NB_COEFS*4] =
{
           2,     3,     2,     1 ,
           2,     1,     1,     0 ,
           1,     0,    -1,    -1 ,
           0,     0,    -2,    -2 ,
          -2,    -3,    -3,    -3 ,
          -3,    -3,    -4,    -4 ,
          -4,    -4,    -4,    -4 ,
          -4,    -5,    -5,    -5 ,
         -11,   -10,   -10,   -10 ,
         -10,   -10,   -10,    -9 ,
          -9,    -9,    -8,    -8 ,
          -7,    -7,    -6,    -6 ,
          -5,    -5,    -4,    -3 ,
          -2,    -1,    -1,     0 ,
           1,     2,     3,     5 ,
           6,     7,     8,     9 ,
         -19,   -18,   -16,   -15 ,
         -14,   -12,   -11,    -9 ,
          -7,    -6,    -4,    -2 ,
          -1,     1,     3,     4 ,
           6,     8,    10,    12 ,
          13,    15,    17,    19 ,
          21,    22,    24,    26 ,
          28,    30,    31,    33 ,
          13,    18,    20,    22 ,
          23,    25,    27,    29 ,
          29,    32,    33,    34 ,
          35,    36,    38,    40 ,
          40,    42,    42,    42 ,
          43,    44,    46,    46 ,
          46,    47,    48,    47 ,
          47,    48,    48,    48 ,
          59,    28,    11,    -5 ,
          -1,     3,     5,     0 ,
          35,     0,    50,     0
};


/* Filter coeffs available from Horizontal zoom 0.25 to zoom 0.50 (zoom out) */
/*------------------------------------------------------------------------------*/
static const S8 HorizontalCoefficientsLumaF[HFC_NB_COEFS*4] =
{
          -9,    -8,    -7,    -4 ,
          -4,    -3,    -3,    -3 ,
          -1,    -1,    -2,    -1 ,
          -1,    -1,    -2,    -2 ,
          -3,    -3,    -3,    -3 ,
          -3,    -3,    -3,    -3 ,
          -3,    -3,    -3,    -3 ,
          -3,    -3,    -3,    -3 ,
         -14,   -13,   -13,   -13 ,
         -12,   -12,   -12,   -11 ,
         -11,   -10,    -9,    -9 ,
          -8,    -7,    -7,    -6 ,
          -5,    -4,    -3,    -2 ,
          -1,     0,     1,     2 ,
           3,     4,     6,     7 ,
           8,    10,    11,    12 ,
         -19,   -18,   -16,   -14 ,
         -13,   -11,    -9,    -8 ,
          -6,    -4,    -3,    -1 ,
           1,     3,     5,     7 ,
           8,    10,    12,    14 ,
          16,    18,    20,    21 ,
          23,    25,    27,    29 ,
          31,    32,    34,    36 ,
          20,    25,    26,    26 ,
          27,    28,    29,    31 ,
          31,    32,    33,    34 ,
          35,    36,    38,    39 ,
          41,    41,    42,    42 ,
          43,    44,    45,    45 ,
          46,    47,    47,    47 ,
          48,    48,    50,    51 ,
          57,    36,    14,    -3 ,
          -7,     3,     4,     0 ,
          37,     0,    53,     0
};

static const S8 HorizontalCoefficientsChromaF[HFC_NB_COEFS*4] =
{
          -4,    -4,    -3,    -4 ,
          -4,    -3,    -4,    -3 ,
          -3,    -4,    -3,    -3 ,
          -2,    -3,    -2,    -3 ,
          -3,    -3,    -3,    -2 ,
          -2,    -2,    -2,    -2 ,
          -1,    -1,    -1,     0 ,
           0,     0,     1,     1 ,
         -13,   -12,   -12,   -11 ,
         -11,   -10,   -10,    -9 ,
          -8,    -8,    -7,    -7 ,
          -6,    -5,    -4,    -4 ,
          -3,    -2,    -1,     0 ,
           0,     1,     2,     3 ,
           4,     5,     6,     7 ,
           8,     9,    10,    12 ,
          -7,    -6,    -5,    -4 ,
          -3,    -1,     0,     1 ,
           2,     4,     5,     6 ,
           7,     9,    10,    11 ,
          13,    14,    15,    16 ,
          18,    19,    20,    21 ,
          23,    24,    25,    26 ,
          28,    29,    30,    31 ,
          17,    22,    23,    25 ,
          26,    26,    28,    28 ,
          29,    31,    31,    32 ,
          32,    33,    33,    35 ,
          35,    36,    36,    36 ,
          37,    38,    38,    39 ,
          38,    39,    40,    39 ,
          40,    40,    40,    40 ,
          52,    25,    13,     1 ,
          -1,     3,    13,     0 ,
          33,     0,    41,     0
};


/***********************************************************/
/*                                                         */
/*                 VERTICAL COEFFICIENTS                   */
/*         ----------------------------------------        */
/*         1      < Zoom < 10     -> use coeffs 'A'        */
/*                  Zoom = 1      -> use coeffs 'B'        */
/*         0.80   < Zoom < 1      -> use coeffs 'C'        */
/*         0.60   < Zoom < 0.80   -> use coeffs 'D'        */
/*         0.50   < Zoom < 0.60   -> use coeffs 'E'        */
/*         0.25   < Zoom < 0.50   -> use coeffs 'F'        */
/*                                                         */
/***********************************************************/

/* Filter coeffs for Vertical zoom chroma = 2 (zoom in) */
/*------------------------------------------------------*/
static const U32 VerticalCoefficientsChromaZoomX2[VFC_NB_COEFS] =
{
    0x201a1f27,
    0x1d1a1f1b,
    0x19171b19,
    0x11121515,
    0x080b0d0f,
    0xfe020306,
    0xf4f9f9fe,
    0xeef3f0f6,
    0x9ba19e8b,
    0x9c9f9a9f,
    0xa8a6a1a1,
    0xbeb8b1ae,
    0xded4cdc5,
    0x07faf2e6,
    0x36261e0f,
    0x64544d3d,
    0xe2d8cbd8,
    0x0a02f7ed,
    0x24211913,
    0x31312e2b,
    0x00d77932,
    0x3681cbed
};


/* use zoom-out coeffs to reduce vertical ringing          */
/* Filter coeffs available for Vertical zoom > 1 (zoom in) */
/*---------------------------------------------------------*/
static const S8 VerticalCoefficientsA[VFC_NB_COEFS*4] =
{
    39,      31,      26,      32,
    27,      31,      26,      29,
    25,      27,      23,      25,
    21,      21,      18,      17,
    15,      13,      11,       8,
     6,       3,       2,      -2,
    -2,      -7,      -7,     -12,
   -10,     -16,     -13,     -18,
  -117,     -98,     -95,    -101,
   -97,    -102,     -97,    -100,
   -95,     -95,     -90,     -88,
   -82,     -79,     -72,     -66,
   -59,     -51,     -44,     -34,
   -26,     -14,      -6,       7,
    15,      30,      38,      54,
    61,      77,      84,     100,
   -40,     -53,     -40,     -30,
   -19,      -9,       2,      10,
    19,      25,      33,      36,
    43,      46,      49,      49,
    50,     121,     -41,       0,
   -19,     -53,    -127,      54,
};

/* Filter coeffs available for Vertical zoom 1 (no zoom) */
/*-------------------------------------------------------*/
static const S8 VerticalCoefficientsB[VFC_NB_COEFS*4] =
{
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,       0,
     0,       0,       0,      64,
};

/* Filter coeffs available for Vertical zoom 0.80 to 1 (zoom out) */
/*-------------------------------------------------------------------*/
static const S8 VerticalCoefficientsLumaC[VFC_NB_COEFS*4] =
{
          -6,    -6,    -7,    -7 ,
          -8,    -8,    -9,    -9 ,
          -9,   -10,   -10,   -10 ,
         -10,   -10,   -10,   -10 ,
         -10,   -10,   -10,    -9 ,
          -9,    -8,    -7,    -6 ,
          -5,    -4,    -2,    -1 ,
           1,     2,     4,     7 ,
         -60,   -57,   -54,   -51 ,
         -47,   -44,   -41,   -38 ,
         -34,   -30,   -26,   -22 ,
         -18,   -14,   -10,    -6 ,
          -6,     3,     7,    12 ,
          16,    21,    25,    29 ,
          33,    37,    41,    45 ,
          49,    52,    56,    60 ,
          45,    47,    52,    55 ,
          56,    59,    62,    65 ,
          66,    68,    69,    70 ,
          72,    72,    74,    74 ,
          83,    68,     4,     8 ,
          -2,   -13,    65,    21
};

static const S8 VerticalCoefficientsChromaC[VFC_NB_COEFS*4] =
{
          -8,    -9,    -9,    -9 ,
          -9,    -9,    -9,    -9 ,
          -9,    -9,    -9,   -10 ,
         -10,   -10,   -10,   -10 ,
         -10,   -10,   -10,    -9 ,
          -9,    -8,    -7,    -6 ,
          -5,    -4,    -3,    -1 ,
           1,     2,     4,     7 ,
         -65,   -62,   -59,   -57 ,
         -54,   -50,   -46,   -43 ,
         -39,   -35,   -31,   -26 ,
         -21,   -17,   -12,    -8 ,
          -7,     1,     7,    11 ,
          16,    20,    24,    29 ,
          34,    39,    43,    48 ,
          51,    56,    61,    64 ,
          48,    52,    55,    60 ,
          63,    64,    67,    69 ,
          71,    73,    75,    76 ,
          76,    77,    77,    79 ,
          86,    72,     5,     8 ,
          -6,     3,     2,    22
};


/* Filter coeffs available for Vertical zoom 0.60 to 0.80 (zoom out) */
/*---------------------------------------------------------------------*/
static const S8 VerticalCoefficientsLumaD[VFC_NB_COEFS*4] =
{
         -18,   -16,   -16,   -15 ,
         -14,   -13,   -12,   -12 ,
         -11,   -10,   -10,    -9 ,
          -8,    -8,    -7,    -6 ,
          -6,    -5,    -4,    -3 ,
          -2,    -1,     0,     2 ,
           3,     5,     6,     8 ,
          10,    12,    14,    16 ,
         -35,   -34,   -31,   -29 ,
         -27,   -24,   -21,   -19 ,
         -16,   -13,   -10,    -7 ,
          -4,     0,     3,     6 ,
           5,    12,    16,    19 ,
          22,    25,    28,    31 ,
          34,    37,    40,    43 ,
          46,    49,    51,    54 ,
          44,    47,    49,    50 ,
          52,    53,    54,    56 ,
          57,    57,    59,    59 ,
          59,    59,    59,    60 ,
          69,    60,    16,     8 ,
           4,   -72,   -63,    17
};

static const S8 VerticalCoefficientsChromaD[VFC_NB_COEFS*4] =
{
         -19,   -16,   -14,   -12 ,
         -11,    -9,    -8,    -8 ,
          -7,    -7,    -6,    -6 ,
          -6,    -5,    -5,    -4 ,
          -3,    -3,    -2,    -1 ,
           0,     1,     2,     3 ,
           4,     6,     7,     9 ,
          11,    13,    15,    17 ,
         -40,   -38,   -37,   -35 ,
         -32,   -30,   -28,   -25 ,
         -22,   -18,   -15,   -12 ,
          -8,    -4,    -1,     3 ,
           2,    10,    13,    16 ,
          19,    22,    25,    29 ,
          32,    35,    38,    42 ,
          46,    49,    53,    57 ,
          47,    49,    52,    54 ,
          55,    57,    60,    61 ,
          62,    62,    63,    64 ,
          64,    63,    64,    63 ,
          71,    62,    19,     8 ,
          -1,   -45,    65,    18
};


/* Filter coeffs available for Vertical zoom 0.50 to 0.60 (zoom out) */
/*-----------------------------------------------------------------------*/
static const S8 VerticalCoefficientsLumaE[VFC_NB_COEFS*4] =
{
         -20,   -19,   -18,   -17 ,
         -16,   -15,   -14,   -13 ,
         -12,   -11,   -10,    -9 ,
          -7,    -6,    -5,    -4 ,
          -3,    -1,     0,     1 ,
           2,     4,     5,     7 ,
           8,     9,    11,    13 ,
          14,    16,    17,    19 ,
          -9,    -8,    -7,    -5 ,
          -4,    -2,    -1,     2 ,
           3,     5,     7,     8 ,
          10,    12,    14,    16 ,
          14,    19,    21,    23 ,
          25,    27,    29,    31 ,
          33,    35,    36,    38 ,
          40,    42,    44,    45 ,
          37,    39,    40,    40 ,
          42,    42,    44,    43 ,
          44,    44,    45,    46 ,
          46,    46,    46,    46 ,
          54,    47,    21,     8 ,
          16,   112,     1,    14
};

static const S8 VerticalCoefficientsChromaE[VFC_NB_COEFS*4] =
{
         -21,   -19,   -18,   -17 ,
         -15,   -14,   -13,   -12 ,
         -11,   -10,    -8,    -7 ,
          -6,    -5,    -4,    -3 ,
          -2,     0,     1,     2 ,
           3,     5,     6,     7 ,
           9,    10,    12,    13 ,
          15,    17,    18,    20 ,
         -13,   -12,   -10,    -9 ,
          -8,    -6,    -4,    -2 ,
           0,     2,     3,     5 ,
           7,     9,    11,    13 ,
          12,    18,    20,    22 ,
          24,    26,    28,    31 ,
          33,    35,    37,    39 ,
          41,    42,    45,    46 ,
          39,    41,    41,    43 ,
          43,    44,    44,    45 ,
          45,    46,    47,    47 ,
          48,    48,    48,    48 ,
          56,    49,    22,     8 ,
          13,  -128,  -127,    14
};


/* Filter coeffs available for Vertical zoom 0.25 to 0.50 (zoom out) */
/*-----------------------------------------------------------------------*/
static const S8 VerticalCoefficientsLumaF[VFC_NB_COEFS*4] =
{
          -9,    -8,    -8,    -8 ,
          -7,    -7,    -6,    -6 ,
          -5,    -5,    -4,    -3 ,
          -2,    -1,    -1,     0 ,
           1,     3,     4,     5 ,
           6,     7,     8,    10 ,
          11,    12,    13,    15 ,
          16,    17,    19,    20 ,
           0,     1,     2,     4 ,
           5,     6,     8,     9 ,
          11,    13,    15,    16 ,
          17,    18,    20,    21 ,
          19,    24,    25,    26 ,
          28,    29,    30,    31 ,
          32,    33,    34,    35 ,
          36,    37,    37,    38 ,
          34,    35,    36,    36 ,
          36,    37,    37,    38 ,
          37,    37,    37,    37 ,
          37,    38,    38,    38 ,
          46,    42,    19,     8 ,
          21,    64,     1,    12
};

static const S8 VerticalCoefficientsChromaF[VFC_NB_COEFS*4] =
{
         -13,   -12,   -11,   -11 ,
         -10,    -9,    -8,    -7 ,
          -7,    -6,    -5,    -4 ,
          -3,    -2,    -1,     0 ,
           1,     2,     3,     4 ,
           5,     6,     8,     9 ,
          10,    11,    13,    14 ,
          15,    17,    18,    20 ,
           0,     1,     2,     4 ,
           5,     6,     7,     8 ,
          10,    11,    13,    14 ,
          16,    17,    18,    19 ,
          17,    22,    24,    25 ,
          27,    28,    29,    30 ,
          31,    33,    34,    36 ,
          36,    38,    38,    40 ,
          34,    34,    36,    35 ,
          37,    36,    37,    38 ,
          39,    39,    38,    39 ,
          38,    39,    39,    40 ,
          47,    42,    20,     8 ,
          21,    72,    65,    12
};

#endif // _STREF_VDP_FILTER_H
